<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户全部查询</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" charset="utf-8" src="/static/js/jquery-1.11.3.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/js/xadmin.js"></script>
    <script type="text/javascript" src="/static/js/jsapi.js"></script>
    <script type="text/javascript" src="/static/js/corechart.js"></script>
    <script type="text/javascript" src="/static/js/jquery.gvChart-1.0.1.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery.ba-resize.min.js"></script>
</head>
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="/admin/welcomepage">首页</a>
        <a href="javascript:window.location.reload();">
          <cite>数据统计 - 用户查询</cite>
        </a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:void(0);" onclick="reload_iframe();" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i>
    </a>
</div>
<div class="x-body">
    <blockquote class="layui-elem-quote">此处可查看用户在平台全部消费信息,以便适当减免和优惠!</blockquote>
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so" action="/admin/count/history_all_query" id="ajaxForm"
              onsubmit="load_msg()">
            &nbsp;用户ID:<input type="number" name="pid" placeholder="请输入PID" autocomplete="off"
                              th:value="${pid}" class="layui-input">
            &nbsp;开始日期:<input type="text" id="dewdewdedew" name="date1" placeholder="请选择开始日期"
                              th:value="${#dates.format(date1,'yyyy-MM-dd')}" class="layui-input">
            &nbsp;结束日期:<input type="text" id="dewdewdedew2" name="date2" placeholder="请选择结束日期"
                              th:value="${#dates.format(date2,'yyyy-MM-dd')}" class="layui-input">
            <button class="layui-btn" type="submit"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>账户</legend>
    </fieldset>
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-col-xs6 layui-col-md6">
                <div class="grid-demo grid-demo-bg1">
                    <table class="layui-table">
                        <tr>
                            <th>用户名:</th>
                            <th th:text="${login_user.user}"></th>
                        </tr>
                        <tr>
                            <th>PID:</th>
                            <th th:text="${login_user.id}"></th>
                        </tr>
                        <tbody>
                        <tr>
                            <td>注册时间:</td>
                            <td th:text="${#dates.format(login_user.cresteTime,'yyyy-MM-dd  HH:mm:ss')}"></td>
                        </tr>
                        <tr>
                            <td>当前余额:</td>
                            <td th:text="${login_user.balnes}"></td>
                        </tr>
                        <tr>
                            <td>全部收入:</td>
                            <td th:text="${todayInMoney + ext_count + query_proxy_money_count}+'元'"></td>
                        </tr>
                        <tr>
                            <td>推广收入:</td>
                            <td th:text="${ext_count}+'元'"></td>
                        </tr>
                        <tr>
                            <td>支付优惠</td>
                            <td th:text="${sale_money}+'元'"></td>
                        </tr>
                        <tr>
                            <td>全部支出手续费:</td>
                            <td th:text="${todayChangeMoneySett}+'元'"></td>
                        </tr>
                        <tr>
                            <td>全部提现手续费:</td>
                            <td th:text="${todaySettMoney}+'元'"></td>
                        </tr>
                        <tr>
                            <td>已完成提现:</td>
                            <td th:text="${todayWaitSettMoney}+'元'"></td>
                        </tr>
                        <tr>
                            <td>代理分润:</td>
                            <td th:text="${query_proxy_money_count}+'元'"></td>
                        </tr>
                        <tr>
                            <td>下级商户数:</td>
                            <td th:text="${query_proxy_user_count}+'个'"></td>
                        </tr>
                        <tr>
                            <td>转账-支出:</td>
                            <td th:text="${tr_out}+'元'"></td>
                        </tr>
                        <tr>
                            <td>转账-收入:</td>
                            <td th:text="${tr_in}+'元'"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md6 layui-col-space5">
                <div class="grid-demo grid-demo-bg1">
                    <div style="width:500px;margin:0 auto;">
                        <table id='myTable5'>
                            <caption>账户收入比例</caption>
                            <thead>
                            <tr>
                                <th></th>
                                <th>全部收入</th>
                                <th>支出手续费</th>
                                <th>提现手续费</th>
                                <th>已退款</th>
                                <th>推广收入</th>
                                <th>转账-支出</th>
                                <th>转账-收入</th>
                                <th>优惠</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td th:text="${todayInMoney + ext_count + tr_in + sale_money}"></td>
                                <td th:text="${todayChangeMoneySett}"></td>
                                <td th:text="${todaySettMoney}"></td>
                                <td th:text="${moneyCount3}"></td>
                                <td th:text="${ext_count}"></td>
                                <td th:text="${tr_out}"></td>
                                <td th:text="${tr_in}"></td>
                                <td th:text="${sale_money}"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>订单</legend>
    </fieldset>
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-col-xs6 layui-col-md6 layui-col-space3">
                <div class="grid-demo grid-demo-bg1">
                    <table class="layui-table">
                        <tr>
                            <th>全部订单:</th>
                            <th th:text="${order1}+'个'"></th>
                        </tr>
                        <tr>
                            <th>API订单:</th>
                            <th th:text="${order2}+'个'"></th>
                        </tr>
                        <tbody>
                        <tr>
                            <td>快捷付款页订单:</td>
                            <td th:text="${order3}+'个'"></td>
                        </tr>
                        <tr>
                            <td>已支付:</td>
                            <td th:text="${order4}+'个'"></td>
                        </tr>
                        <tr>
                            <td>未支付:</td>
                            <td th:text="${order5}+'个'"></td>
                        </tr>
                        <tr>
                            <td>已退款:</td>
                            <td th:text="${order9}+'个'"></td>
                        </tr>
                        <tr>
                            <td>已优惠:</td>
                            <td th:text="${sale_money}+'元'"></td>
                        </tr>
                        <tr>
                            <td>已退款金额:</td>
                            <td th:text="${moneyCount3}+'元'"></td>
                        </tr>
                        <tr>
                            <td>手续费:</td>
                            <td th:text="${order6}+'元'"></td>
                        </tr>
                        <tr>
                            <td>已支付金额:</td>
                            <td th:text="${moneyCount1}+'元'"></td>
                        </tr>
                        <tr>
                            <td>未支付金额:</td>
                            <td th:text="${moneyCount2}+'元'"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md6 layui-col-space3">
                <div class="grid-demo grid-demo-bg1">
                    <table id='myTable1'>
                        <caption>订单支付比例</caption>
                        <thead>
                        <tr>
                            <th></th>
                            <th th:text="'已支付'+${order4}+'个'"></th>
                            <th th:text="'未支付'+${order5}+'个'"></th>
                            <th>交易手续费</th>
                            <th>已退款</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <th th:text="${moneyCount1 + moneyCount2 + order6 + moneyCount3}"></th>
                            <td th:text="${moneyCount1}"></td>
                            <td th:text="${moneyCount2}"></td>
                            <td th:text="${order6}"></td>
                            <td th:text="${moneyCount3}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>结算</legend>
    </fieldset>
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-col-xs6 layui-col-md6 layui-col-space3">
                <div class="grid-demo grid-demo-bg1">
                    <table class="layui-table">
                        <tr>
                            <th>全部结算:</th>
                            <th th:text="${settCountAll}+'个'"></th>
                        </tr>
                        <tr>
                            <th>已结算:</th>
                            <th th:text="${settPayOkCount}+'个'"></th>
                        </tr>
                        <tbody>
                        <tr>
                            <td>未结算:</td>
                            <td th:text="${settPayFaildCount}+'个'"></td>
                        </tr>
                        <tr>
                            <td>取消结算:</td>
                            <td th:text="${settCanelCount}+'个'"></td>
                        </tr>
                        <tr>
                            <td>已结算总金额:</td>
                            <td th:text="${money1}+'元'"></td>
                        </tr>
                        <tr>
                            <td>已结算结算手续费:</td>
                            <td th:text="${money2}+'元'"></td>
                        </tr>
                        <tr>
                            <td>取消结算金额:</td>
                            <td th:text="${money3}+'元'"></td>
                        </tr>
                        <tr>
                            <td>取消结算手续费:</td>
                            <td th:text="${money4}+'元'"></td>
                        </tr>
                        <tr>
                            <td>未结算金额:</td>
                            <td th:text="${money5}+'元'"></td>
                        </tr>
                        <tr>
                            <td>未结算手续费:</td>
                            <td th:text="${money6}+'元'"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-col-xs6 layui-col-md6 layui-col-space3">
                <div class="grid-demo grid-demo-bg1">
                    <table id='myTable2'>
                        <caption>结算比例</caption>
                        <thead>
                        <tr>
                            <th></th>
                            <th th:text="'已结算'+${settPayOkCount}+'个'"></th>
                            <th th:text="'未结算'+${settPayFaildCount}+'个'"></th>
                            <th th:text="'已取消'+${settCanelCount}+'个'"></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <th th:text="${money1+ money2 + money3 + money4 + money5 + money6}"></th>
                            <td th:text="${money1}"></td>
                            <td th:text="${money5}"></td>
                            <td th:text="${money3}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<script th:inline="javascript">
    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '#dewdewdedew', //指定元素
                format: 'yyyy-MM-dd',
                value: "[(${#dates.format(date1,'yyyy-MM-dd')})]"
            });
            laydate.render({
                elem: '#dewdewdedew2', //指定元素
                format: 'yyyy-MM-dd',
                value: "[(${#dates.format(date2,'yyyy-MM-dd')})]"
            });
        });
        gvChartInit();
        $('#myTable5').gvChart({
            chartType: 'PieChart',
            gvSettings: {
                vAxis: {title: 'No of players'},
                hAxis: {title: 'Month'},
                width: 600,
                height: 350
            }
        });

        $('#myTable1').gvChart({
            chartType: 'PieChart',
            gvSettings: {
                vAxis: {title: 'No of players'},
                hAxis: {title: 'Month'},
                width: 600,
                height: 350
            }
        });

        $('#myTable2').gvChart({
            chartType: 'PieChart',
            gvSettings: {
                vAxis: {title: 'No of players'},
                hAxis: {title: 'Month'},
                width: 600,
                height: 350
            }
        });
    });
    window.onload = close_loading_msg();

    function reload_iframe() {
        parent.obj = parent.layer.load(0);
        location.replace(location.href);
    }

</script>
</body>
</html>